package org.gdufe.pojos.pojo;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.annotation.JSONType;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

//借阅记录
@Data
@TableName("t_log")
public class Log implements Serializable {
    //借阅记录的编号，借阅信息的唯一标识
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    //借阅人id
    @JSONField(name = "uId")
    private Integer uId;
    //借阅人名称，冗余字段
    private String username;
    //借阅书籍的id
    @JSONField(name = "bId")
    @JsonProperty("bId")
    private Integer bId;
    //借阅书籍名称，冗余字段
    private String title;
    //借阅时间

    private LocalDateTime borrowTime;
    //归还时间
    private LocalDateTime returnTime;

    /*
    记录书籍状态，
    0 借出，
    1 已归还，
    2 挂失
    */
    private Integer status;
}
